﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace StoragePeriod.Data
{
    public partial class Role
    {
        public static IQueryable<Role> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.Role.Where(queryStr, par);
        }

        public static IQueryable<Role> All()
        {
            return LinqUtility.LinqContext.Role;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(Role), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(Role), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class Privileges
    {
        public static IQueryable<Privileges> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.Privileges.Where(queryStr, par);
        }

        public static IQueryable<Privileges> All()
        {
            return LinqUtility.LinqContext.Privileges;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(Privileges), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(Privileges), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class RolePrivileges
    {
        public static IQueryable<RolePrivileges> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.RolePrivileges.Where(queryStr, par);
        }

        public static IQueryable<RolePrivileges> All()
        {
            return LinqUtility.LinqContext.RolePrivileges;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RolePrivileges), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RolePrivileges), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class RoleUsers
    {
        public static IQueryable<RoleUsers> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.RoleUsers.Where(queryStr, par);
        }

        public static IQueryable<RoleUsers> All()
        {
            return LinqUtility.LinqContext.RoleUsers;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RoleUsers), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RoleUsers), ActionType.Update, entity, where, null, wherePar);
        }
    }
    
    public partial class RawMaterialType
    {
        public static IQueryable<RawMaterialType> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.RawMaterialType.Where(queryStr, par);
        }

        public static IQueryable<RawMaterialType> All()
        {
            return LinqUtility.LinqContext.RawMaterialType;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawMaterialType), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawMaterialType), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class SendList
    {
        public static IQueryable<SendList> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.SendList.Where(queryStr, par);
        }

        public static IQueryable<SendList> All()
        {
            return LinqUtility.LinqContext.SendList;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(SendList), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(SendList), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class Grading
    {
        public static IQueryable<Grading> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.Grading.Where(queryStr, par);
        }

        public static IQueryable<Grading> All()
        {
            return LinqUtility.LinqContext.Grading;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(Grading), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(Grading), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class GradingInfo
    {
        public static IQueryable<GradingInfo> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.GradingInfo.Where(queryStr, par);
        }

        public static IQueryable<GradingInfo> All()
        {
            return LinqUtility.LinqContext.GradingInfo;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(GradingInfo), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(GradingInfo), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class ScoreData
    {
        public static IQueryable<ScoreData> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.ScoreData.Where(queryStr, par);
        }

        public static IQueryable<ScoreData> All()
        {
            return LinqUtility.LinqContext.ScoreData;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(ScoreData), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(ScoreData), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class VcData
    {
        public static IQueryable<VcData> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.VcData.Where(queryStr, par);
        }

        public static IQueryable<VcData> All()
        {
            return LinqUtility.LinqContext.VcData;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(VcData), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(VcData), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class WaterData
    {
        public static IQueryable<WaterData> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.WaterData.Where(queryStr, par);
        }

        public static IQueryable<WaterData> All()
        {
            return LinqUtility.LinqContext.WaterData;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(WaterData), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(WaterData), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class CarbohydratesData
    {
        public static IQueryable<CarbohydratesData> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.CarbohydratesData.Where(queryStr, par);
        }

        public static IQueryable<CarbohydratesData> All()
        {
            return LinqUtility.LinqContext.CarbohydratesData;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(CarbohydratesData), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(CarbohydratesData), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class ProteinData
    {
        public static IQueryable<ProteinData> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.ProteinData.Where(queryStr, par);
        }

        public static IQueryable<ProteinData> All()
        {
            return LinqUtility.LinqContext.ProteinData;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(ProteinData), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(ProteinData), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class MineralData
    {
        public static IQueryable<MineralData> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.MineralData.Where(queryStr, par);
        }

        public static IQueryable<MineralData> All()
        {
            return LinqUtility.LinqContext.MineralData;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(MineralData), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(MineralData), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class OperationTeam
    {
        public static IQueryable<OperationTeam> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.OperationTeam.Where(queryStr, par);
        }

        public static IQueryable<OperationTeam> All()
        {
            return LinqUtility.LinqContext.OperationTeam;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(OperationTeam), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(OperationTeam), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class SYS_Users
    {
        public static IQueryable<SYS_Users> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.SYS_Users.Where(queryStr, par);
        }

        public static IQueryable<SYS_Users> All()
        {
            return LinqUtility.LinqContext.SYS_Users;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(SYS_Users), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(SYS_Users), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class IntroduceStorage
    {
        public static IQueryable<IntroduceStorage> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.IntroduceStorage.Where(queryStr, par);
        }

        public static IQueryable<IntroduceStorage> All()
        {
            return LinqUtility.LinqContext.IntroduceStorage;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContext, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(IntroduceStorage), ActionType.Delete, null, where, LinqUtility.LinqContext, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(IntroduceStorage), ActionType.Update, entity, where, LinqUtility.LinqContext, wherePar);
        }
    }
    public partial class RawNorm
    {
        public static IQueryable<RawNorm> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.RawNorm.Where(queryStr, par);
        }

        public static IQueryable<RawNorm> All()
        {
            return LinqUtility.LinqContext.RawNorm;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawNorm), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawNorm), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class PanelsConfig
    {
        public static IQueryable<PanelsConfig> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.PanelsConfig.Where(queryStr, par);
        }

        public static IQueryable<PanelsConfig> All()
        {
            return LinqUtility.LinqContext.PanelsConfig;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(PanelsConfig), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(PanelsConfig), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class CalculateModel
    {
        public static IQueryable<CalculateModel> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.CalculateModel.Where(queryStr, par);
        }

        public static IQueryable<CalculateModel> All()
        {
            return LinqUtility.LinqContext.CalculateModel;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(CalculateModel), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(CalculateModel), ActionType.Update, entity, where, null, wherePar);
        }
    }
    public partial class ImgView
    {
        public static IQueryable<ImgView> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContext.ImgView.Where(queryStr, par);
        }

        public static IQueryable<ImgView> All()
        {
            return LinqUtility.LinqContext.ImgView;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, null, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(ImgView), ActionType.Delete, null, where, null, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(ImgView), ActionType.Update, entity, where, null, wherePar);
        }
    }
    
    public partial class RawMaterial
    {
        public static IQueryable<RawMaterial> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.RawMaterial.Where(queryStr, par);
        }

        public static IQueryable<RawMaterial> All()
        {
            return LinqUtility.LinqContextCMS.RawMaterial;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawMaterial), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawMaterial), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class Personnel
    {
        public static IQueryable<Personnel> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.Personnel.Where(queryStr, par);
        }

        public static IQueryable<Personnel> All()
        {
            return LinqUtility.LinqContextCMS.Personnel;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(Personnel), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(Personnel), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class OperationArea
    {
        public static IQueryable<OperationArea> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.OperationArea.Where(queryStr, par);
        }

        public static IQueryable<OperationArea> All()
        {
            return LinqUtility.LinqContextCMS.OperationArea;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(OperationArea), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(OperationArea), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class ClassInfo
    {
        public static IQueryable<ClassInfo> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.ClassInfo.Where(queryStr, par);
        }

        public static IQueryable<ClassInfo> All()
        {
            return LinqUtility.LinqContextCMS.ClassInfo;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(ClassInfo), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(ClassInfo), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class NutritionElements
    {
        public static IQueryable<NutritionElements> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.NutritionElements.Where(queryStr, par);
        }

        public static IQueryable<NutritionElements> All()
        {
            return LinqUtility.LinqContextCMS.NutritionElements;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(NutritionElements), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(NutritionElements), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class NutrientComposition
    {
        public static IQueryable<NutrientComposition> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.NutrientComposition.Where(queryStr, par);
        }

        public static IQueryable<NutrientComposition> All()
        {
            return LinqUtility.LinqContextCMS.NutrientComposition;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(NutrientComposition), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(NutrientComposition), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class user
    {
        public static IQueryable<user> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.user.Where(queryStr, par);
        }

        public static IQueryable<user> All()
        {
            return LinqUtility.LinqContextCMS.user;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(user), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(user), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class NutritionType
    {
        public static IQueryable<NutritionType> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.NutritionType.Where(queryStr, par);
        }

        public static IQueryable<NutritionType> All()
        {
            return LinqUtility.LinqContextCMS.NutritionType;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(NutritionType), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(NutritionType), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class IntroduceNutrition
    {
        public static IQueryable<IntroduceNutrition> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.IntroduceNutrition.Where(queryStr, par);
        }

        public static IQueryable<IntroduceNutrition> All()
        {
            return LinqUtility.LinqContextCMS.IntroduceNutrition;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(IntroduceNutrition), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(IntroduceNutrition), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class RawMaterials
    {
        public static IQueryable<RawMaterials> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.RawMaterials.Where(queryStr, par);
        }

        public static IQueryable<RawMaterials> All()
        {
            return LinqUtility.LinqContextCMS.RawMaterials;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawMaterials), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawMaterials), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
    public partial class RawMaterialsInfo
    {
        public static IQueryable<RawMaterialsInfo> Where(string queryStr, params object[] par)
        {
            return LinqUtility.LinqContextCMS.RawMaterialsInfo.Where(queryStr, par);
        }

        public static IQueryable<RawMaterialsInfo> All()
        {
            return LinqUtility.LinqContextCMS.RawMaterialsInfo;
        }
        /// <summary>
        /// 插入方法
        /// </summary>
        /// <param name="entity">实体</param>
        public static void Insert(object entity)
        {
            LinqUtility.UpdateContextData(null, ActionType.Insert, entity, null, LinqUtility.LinqContextCMS, null);
        }
        /// <summary>
        /// 删除方法
        /// </summary>
        /// <param name="tableType">表类型</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Delete(string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawMaterialsInfo), ActionType.Delete, null, where, LinqUtility.LinqContextCMS, wherePar);
        }
        /// <summary>
        /// 更新方法
        /// </summary>
        /// <param name="entity">实体</param>
        /// <param name="where">查询表达式</param>
        /// <param name="wherePar">参数</param>
        public static void Update(object entity, string where, params object[] wherePar)
        {
            LinqUtility.UpdateContextData(typeof(RawMaterialsInfo), ActionType.Update, entity, where, LinqUtility.LinqContextCMS, wherePar);
        }
    }
}
